[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 20
  ny = 20
  xmin = -10
  xmax = 0
  ymin = -10
  ymax = 0

  uniform_refine = 0
  #second_order = true
[]

[Problem]
  type = IsoVortexProblem
  jacobian_delay = 10
  [Variables]
    order = FIRST
    family = MONOMIAL
    variables = 'density momx momy momz rhoe'
  []
  [ICs]
    type = CFDInitialCondition
  []
  [./Kernels]
    type = CFDCellKernel
  [../]

  [DGKernels]
    type = CFDFaceKernel
  []
 
[]


[AuxVariables]
  [proc_id]
     order = CONSTANT
     family = MONOMIAL
  []
[]

[AuxKernels]
  [./proc_id]
    type =  ProcessorIDAux
    variable = proc_id
  [../]
[]

[BoundaryCondition]
    [euler_far_field]
        type =  PeriodicBC
        boundary = '1 3 2'
        auto_translate = true
    []
    [periodic]
      type = PeriodicBC
      boundary = '0'
      auto_translate = true
    []
[]
#
#[BCs]
#  [./Periodic]
#    [./all]
#       auto_direction = 'y'
#       variable =  density
#    [../]
#  [../]
#[]


[Preconditioning]
   [SMP]
     type = SMP
     full = true
   []
[]

[Executioner]
  type = Transient
  solve_type = NEWTON
  scheme = bdf2
  dt = 0.01
  num_steps = 10000
  l_tol = 1e-04
  l_max_its = 100

  nl_max_its = 10
  nl_rel_tol = 1e-06

  petsc_options_iname = '-ksp_type  -pc_type -snes_lag_jacobian -snes_lag_preconditioner'
  petsc_options_value = 'gmres       bjacobi 20 20'
  end_time = 10
[]


[Postprocessors]
  [./l2_err]
    type = ProblemElementalL2Error
  [../]
[]


[Outputs]
 	csv = true
	gnuplot = true
	[./exodus]
		type = Exodus
		execute_on = 'initial timestep_end'
	[../]

	[./console]
		type = Console
		perf_log = true
		execute_on = 'linear nonlinear'
	[../]
[]

[Debug]
  show_var_residual_norms = true
[]
